﻿using System;
using System.Windows.Forms;
using System.Reflection;

namespace SiteMapEditor
{
    static class Program
    {
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        [STAThread]
        static void Main()
        {
            AssemblyName[] referencedAssemblies = Assembly.GetExecutingAssembly().GetReferencedAssemblies();

            foreach (AssemblyName name in referencedAssemblies)
            {
                try
                {
                    Assembly.Load(name);
                }
                catch
                {
                    MessageBox.Show("The assembly/application " + name.FullName + " must be accessible for this application!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                    return;
                }
            }

            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new MainForm());
        }
    }
}
